/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_TYPES_H
#define _LINUX_TYPES_H

#include <linux/bitops.h>

#define	NULL	0

// #define BITS_PER_LONG 32

// #include <imx6ul/cc.h>
typedef signed char s8;
typedef unsigned char u8;

typedef unsigned char __u8;

typedef signed short s16;
typedef unsigned short u16;

typedef signed int s32;
typedef unsigned int u32;

typedef signed long s64;
typedef unsigned long u64;

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;
// typedef unsigned long long __u64;
typedef unsigned long __u64;

typedef unsigned char bool;

typedef u32 phys_addr_t;

typedef unsigned int size_t;

typedef struct {
	volatile int counter;
} atomic_t;

#define pgoff_t unsigned long

typedef unsigned gfp_t;

#define DECLARE_BITMAP(name,bits) \
	unsigned long name[BITS_TO_LONGS(bits)]

typedef int		pid_t;

typedef unsigned long irq_hw_number_t;

// typedef long long		__kernel_loff_t;
typedef long		__kernel_loff_t;
typedef __kernel_loff_t		loff_t;

typedef int		__kernel_ssize_t;
typedef __kernel_ssize_t	ssize_t;

typedef unsigned int	__kernel_size_t;

typedef __u32	__be32;

typedef unsigned char		u_char;

#define true 1
#define false 0

typedef __u32 __kernel_dev_t;
typedef __kernel_dev_t		dev_t;

typedef unsigned short umode_t;

typedef unsigned long	__kernel_ulong_t;
typedef __kernel_ulong_t __kernel_ino_t;
typedef __kernel_ino_t		ino_t;

typedef unsigned int	__kernel_uid32_t;
typedef unsigned int	__kernel_gid32_t;
typedef __kernel_uid32_t	uid_t;
typedef __kernel_gid32_t	gid_t;

#define __bitwise

typedef __u16 __bitwise __le16;
typedef __u16 __bitwise __be16;
typedef __u32 __bitwise __le32;
typedef __u32 __bitwise __be32;
typedef __u64 __bitwise __le64;
typedef __u64 __bitwise __be64;

typedef unsigned long sector_t;
typedef unsigned long blkcnt_t;

typedef unsigned short	__kernel_mode_t;
typedef __kernel_mode_t		mode_t;

#endif /* _LINUX_TYPES_H */
